﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xtensive.Storage;
using Xtensive.Integrity.Aspects.Constraints;

namespace SMS.Core.Model.Data
{
    class Order_item : Entity
    {
        [Key, Field]
        public int order_no { get; private set; }

        [Field]
        public EntitySet<Cust_order> cust_orders { get; set; }

        [Key, Field]
        public int item_no { get; private set; }

        [Field]
        public EntitySet<Item> items { get; set; }

        [Field]
        public int order_qty { get; set; }

        [Field(Precision = 2), RangeConstraint(Min = 0)]
        public decimal amount { get; set; } 

    }
}
